/*
 * ClientCommands.hpp
 *
 *  Created on: 14 mei 2013
 *      Author: maarten
 */

#ifndef CLIENTCOMMANDS_HPP_
#define CLIENTCOMMANDS_HPP_

#include "Parser.hpp"
#include "Message.hpp"
#include <string>
#include <vector>

class ClientCommands {
public:
	ClientCommands(int socketDescriptor);
	virtual ~ClientCommands();

	int requestLogon(std::string username, std::string password);
	void requestUpload(std::string filePath);
	void requestDownload(std::string file);
	void requestDirStructure(std::string dir);

private:
	int socketDescriptor;
	Parser parser;
	bool HANIntern;
	std::vector<std::string> extentions;

	Message waitForResponse();
	int checkMessageCode(int code, int expectedCode);
	int checkMessageCodeMore(int code, std::vector<int> expectedCode);

};

#endif /* CLIENTCOMMANDS_HPP_ */
